<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta content="yes" name="apple-mobile-web-app-capable">
  <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
  <meta data-vue-meta="ssr" name="keywords" content="{{$normal['keyword']}}">
  <meta data-vue-meta="ssr" name="description" content="{{$normal['desc']}}">
  <style>

  </style>
  <title>{{$normal['title']}}</title>
  <!-- 引入样式文件 -->
  <!--<link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/vant@3.6.10/lib/index.css" />-->
  <link rel="stylesheet" href="/waphome/css/vant.css">
  <link rel="stylesheet" href="/waphome/css/login.css">
  <link rel="stylesheet" href="/waphome/css/base.css">
  <link rel="stylesheet" href="/waphome/css/index.css">
  <link rel="stylesheet" href="/waphome/css/herder.css">
  <link rel="stylesheet" href="/waphome/css/home.css?v=2">
  <link rel="stylesheet" href="/waphome/css/worditem.css">
  <link rel="stylesheet" href="/waphome/css/searchpoop.css">
  <link rel="stylesheet" href="/waphome/css/payCofirm.css">
  <link rel="stylesheet" href="/waphome/css/CouponDialog.css">
  <link rel="icon" href="/waphome/favicon.ico">
  <!-- JS -->
  <script src="/waphome/js/vue.js"></script>
  <script src="/waphome/js/amfe-flexible.js"></script>
  <script src="/waphome/js/js-cookie.js"></script>
  <script src="/waphome/js/axios.js"></script>
  <script src="/waphome/js/service.js"></script>
  <script src="/waphome/js/swiper.js"></script>

  <!-- 引入 Vue 和 Vant 的 JS 文件 -->
  <!--<script src="https://fastly.jsdelivr.net/npm/vue@3"></script>-->

  <script src="/waphome/js/vue-router.js"></script>

  <script src="/waphome/js/vant.js"></script>
  <script src="/home/js/CryptoJS.js"></script>




  <script>
    setTimeout(() => {
      //     window.eval('{{str_replace('"', '`', $normal['code'])}}')
      // // 客服链接
      // // eslint-disable-next-line no-eval
      //   window.eval('{{str_replace('"', '`', $normal['wap_service'])}}')

      window.eval(<?php echo json_encode(str_replace('"', '`', $normal['wap_service'])) ?>)
      window.eval(<?php echo json_encode(str_replace('"', '`', $normal['code'])) ?>)
    }, 500)

    function envjudge() {
      const isMobile = window.navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i) // 是否手机端
      const isWx = /micromessenger/i.test(navigator.userAgent) // 是否微信
      const isiOS = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)
      const isAndroid = navigator.userAgent.indexOf('Android') > -1 || navigator.userAgent.indexOf('Adr') > -1
      const isComWx = /wxwork/i.test(navigator.userAgent) // 是否企业微信

      if (isComWx && isMobile) { // 手机端企业微信
        return 'com-wx-mobile'
      } else if (isComWx && !isMobile) { // PC端企业微信
        return 'com-wx-pc'
      } else if (isWx && isMobile) { // 手机端微信
        return 'wx-mobile'
      } else if (isWx && !isMobile) { // PC端微信
        return 'wx-pc'
      } else if (isMobile && isAndroid) {
        return 'Android-mobile'
      } else if (isMobile && isiOS) {
        return 'iOS'
      } else {
        return 'other'
      }
    }
    if (envjudge() === 'other') {
      console.log('okokokokok')
      // 跳转到移动
      window.location.href = 'https://www.wenhetong.com'
    }
  </script>
  <!--<script src="https://fastly.jsdelivr.net/npm/vant@3.6.10/lib/vant.min.js"></script>-->
</head>

<body>
  <!-- <script type="importmap">
  {
    "imports": {
      "vue": "https://fastly.jsdelivr.net/npm/vant@3.6.10/lib/vant.min.js"
    }
  }
</script> -->

  <div id="app">
    <!-- 顶部 -->
    <header-index @search-s-how="searchSHow = true"></header-index>
    <!-- home -->
    <!-- <home-index></home-index> -->
    <login-index :show="showLogin" @close="showLogin = $event"></login-index>
    <!-- 搜索弹层 -->
    <!--<searchPopup :search-show="searchSHow"  @close="searchSHow = $event"/>-->
    <search-popup :search-show="searchSHow" @close="searchSHow = $event"></search-popup>
    <!--核实订单-->
    <pay-cofirm :is-dialog="payCofirmShow" @close="payCofirmShow = $event" @finish="finish" @goonPay="goonPay"></pay-cofirm>
    <!-- 优惠券弹框 -->
    <coupon-dialog v-if="copponShow" :is-dialog="copponShow" @close="copponShow = $event"></coupon-dialog>



    <div class="home-container">
      <!-- 分类 -->
      <div class="tabs_scroll">
        <!-- <van-tabs class="tabs" v-model:active="classActive" color="#fd4f01" @click-tab="clickItem"
          title-active-color="#fd4f01">
          <van-tab v-for="item in classIfyListArr" :key="item.id" :title="item.label">
          </van-tab>
        </van-tabs> -->
        <div class="tabs">
          <ul>
            <li>
              <span :class="avtiveTab === -1 ? 'active' : '' " @click="avtiveTab = -1">
                推荐
              </span>
            </li>
            @foreach($class_list as $k => $v)
            <li>
              <a style="color:#000" href="/wap/classify/f/{{$k}}?id={{$v['id']}}" :class="{{$k}} === avtiveTab ? 'active' : '' " @click="avtiveTab = {{$k}}"> {{ $v['label'] }}</a>
            </li>
            @endforeach
          </ul>
          <!-- @{{classIfyListArr}} -->
        </div>
      </div>
      <!-- banner -->
      <!-- 骨架屏 -->
      <img src="" alt="" id="emty">
      <van-swipe class="my-swipe" id="my-swipe" :autoplay="3000" indicator-color="white" lazy-render>
        <van-swipe-item v-for="item in swiperList" :key="item.id" @click="clickToSwiperUrl(item.addr)" v-show="item.url">
          <div class="pic">
            <img v-if="item.url" :src="item.url" alt="" style="display: none;" v-show="item.url">
          </div>
        </van-swipe-item>
      </van-swipe>
      <!-- 热门分类 -->
      <div class="headline">
        <div class="title">热门模板</div>
        <!-- 分类列表 -->
        <div class="swiper-container">
          <div class="swiper-wrapper" style="display: flex;">

            <!-- 骨架屏 -->
            <div class="swiper-slide side_item" id="side_item_emty">
              <a href="#">
                <img style="background-color: #f2f3f5; animation: van-skeleton-blink var(--van-skeleton-animation-duration) ease-in-out infinite;" src="" alt="">
              </a>
            </div>
            <div class="swiper-slide side_item" id="side_item_emty">
              <a href="#">
                <img style="background-color: #f2f3f5; animation: van-skeleton-blink var(--van-skeleton-animation-duration) ease-in-out infinite;" src="" alt="">
              </a>
            </div>
            <div class="swiper-slide side_item" id="side_item_emty">
              <a href="#">
                <img style="background-color: #f2f3f5; animation: van-skeleton-blink var(--van-skeleton-animation-duration) ease-in-out infinite;" src="" alt="">
              </a>
            </div>
            <div class="swiper-slide side_item" id="side_item_emty">
              <a href="#">
                <img style="background-color: #f2f3f5; animation: van-skeleton-blink var(--van-skeleton-animation-duration) ease-in-out infinite;" src="" alt="">
              </a>
            </div>

            <div style="display: none;" v-show="hotClassifyList.length" class="swiper-slide side_item" v-for="item in hotClassifyList" :key="item.id" @click="hotClassClick(item.url)">
              <a href="#">
                <img v-if="item.image" :src="item.image" alt="">
              </a>
            </div>
            <!--<div class="swiper-slide side_item" v-if="hotClassifyList.length <= 3">-->
            <!--  <a href="#">-->
            <!--<img v-if="item.image" :src="item.image" alt="">-->
            <!--  </a>-->
            <!--</div>-->
          </div>
          <!-- <div class="swiper-pagination"></div> -->
        </div>
        <!--<div v-else>44</div>-->
      </div>

      <!-- 劳动合同 -->
      @foreach($contract_list as $k => $v)
      <div>
        <div class="headline">
          <span class="title">{{$k}}</span>
          <span class="more" @click="clickMore('{{$k}}')">查看更多</span>
        </div>
        <div class="labour">
          <ul class="word-main">
            @foreach($v as $k1 => $v1)
            <li class="worditem_li" @click="clickWordItem({{$v1['id']}},'{{$v1['title']}}','{{$v1['title_pic']}}')">
              <div class="pic">
                <img src="{{$v1['title_pic']}}" alt="">
              </div>
              <div class="text">{{ $v1['title'] }}</div>
            </li>
            @endforeach
            <!-- <word-item v-for="item in homeList[0]?.data" :key="item.id" :item="item" /> -->
          </ul>
        </div>
      </div>
      @endforeach

      <!-- 排行榜 -->
      <div class="ranking_list">
        <div class="title">排行榜</div>
        <div class="ranking_box">
          <ul>
            @foreach($top_list as $k => $v)
            <li>
              <div class="class_title">{{$k}}</div>
              <div class="class_content">
                @foreach($v as $k1 => $v1)
                @if($k1 == 0)
                <div class="left">
                  <div class="class_box">
                    <a href="/contractdetail/{{$v1['id']}}.html">
                      <i>{{$k1+1}}</i>
                      {{$v1['title']}}
                    </a>
                  </div>
                  @elseif($k1 == 3)
                </div>
                <div class="right">
                  <div class="class_box">
                    <a href="/contractdetail/{{$v1['id']}}.html">
                      <i>{{$k1+1}}</i>
                      {{$v1['title']}}
                    </a>
                  </div>
                  @else
                  <div class="class_box">
                    <a href="/contractdetail/{{$v1['id']}}.html">
                      <i>{{$k1+1}}</i>
                      {{$v1['title']}}
                    </a>
                  </div>
                  @endif
                  @endforeach
                </div>
              </div>
            </li>
            @endforeach
          </ul>
        </div>
      </div>
      <!-- 版权栏 -->
      <div class="copyrightr">
        <div class="bott">Copyright ©@{{ new Date().getFullYear() }} 版权所有 智取(浙江)信息科技有限公司浙ICP备2023008636号</div>

      </div>
      <!-- 登录框 -->
      <login :show="show" @close="show = $event" />
      <!-- 开通vip弹框 -->
      <OpenVip :openvipSHow="openvipSHow" @close="openvipSHow = $event" />
    </div>
    <!-- App -->
    <van-tabbar class="van-tabbar van-tabbar--fixed van-hairline--top-bottom van-safe-area-bottom van-tabbar--fixed" v-model="active" active-color="#fd4f01" inactive-color="#aeafae" style="font-size:12px">
      <div class="van-tabbar-item" @click="clickHome">
        <div class="van-badge__wrapper van-tabbar-item__icon">
          <svg t="1683943585785" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11938" width="0.50rem" height="0.50rem">
            <path d="M784 912H240a128 128 0 0 1-128-128V419.66a128 128 0 0 1 55.91-105.77l272-185.4a128 128 0 0 1 144.18 0l272 185.4A128 128 0 0 1 912 419.66V784a128 128 0 0 1-128 128z" fill="#FFFFFF" p-id="11939"></path>
            <path d="M784 896H272a112 112 0 0 1-112-112V427.24a112 112 0 0 1 49-92.58l242.63-165.21A112 112 0 0 1 574 167l269.3 168.11a112 112 0 0 1 52.7 95V784a112 112 0 0 1-112 112z" fill="#FFE07A" p-id="11940"></path>
            <path d="M784 928H240c-79.4 0-144-64.6-144-144V419.66a143.91 143.91 0 0 1 62.89-119l272-185.4a144 144 0 0 1 162.22 0l272 185.4a143.91 143.91 0 0 1 62.89 119V784c0 79.4-64.6 144-144 144zM512 122.12a111.8 111.8 0 0 0-63.08 19.59l-272 185.4A111.93 111.93 0 0 0 128 419.66V784a112.12 112.12 0 0 0 112 112h544a112.12 112.12 0 0 0 112-112V419.66a111.93 111.93 0 0 0-48.92-92.55l-272-185.4A111.8 111.8 0 0 0 512 122.12z" fill="#333333" p-id="11941"></path>
            <path d="M256 449m32 0l128 0q32 0 32 32l0 0q0 32-32 32l-128 0q-32 0-32-32l0 0q0-32 32-32Z" fill="#333333" p-id="11942"></path>
            <path d="M432 656h160a64 64 0 0 1 64 64v192H368V720a64 64 0 0 1 64-64z" fill="#FFFFFF" p-id="11943"></path>
            <path d="M464 704h128a48 48 0 0 1 48 48v144H464a48 48 0 0 1-48-48v-96a48 48 0 0 1 48-48z" fill="#FF9580" p-id="11944"></path>
            <path d="M672 928H352V720a80.09 80.09 0 0 1 80-80h160a80.09 80.09 0 0 1 80 80z m-288-32h256V720a48.05 48.05 0 0 0-48-48H432a48.05 48.05 0 0 0-48 48z" fill="#333333" p-id="11945"></path>
          </svg>
        </div>
        <div class="van-tabbar-item__text" :style="active === 0 ? 'color:#fd4f01' : 'color:#333' ">
          首页
        </div>
      </div>
      <div class="van-tabbar-item" @click="clickToClass">
        <div class="van-badge__wrapper van-tabbar-item__icon">
          <!--<i class="iconfont icon-sort"></i>-->
          <svg t="1684290592910" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="48498" width="0.42rem" height="0.42rem">
            <path d="M611.274686 536.818671h125.012567a182.003591 182.003591 0 0 1 182.003591 182.003591v3.67684a182.003591 182.003591 0 0 1-182.003591 182.003591h-3.67684a182.003591 182.003591 0 0 1-182.003591-182.003591v-125.012567a58.829443 58.829443 0 0 1 58.829444-58.829443zM412.725314 487.181329h-125.012567a182.003591 182.003591 0 0 1-182.003591-182.003591v-3.67684a182.003591 182.003591 0 0 1 182.003591-182.003591h3.67684a182.003591 182.003591 0 0 1 182.003591 182.003591v126.850987a58.829443 58.829443 0 0 1-60.667864 58.829444zM471.554758 597.486535v125.012567a182.003591 182.003591 0 0 1-182.003591 182.003591h-3.67684a182.003591 182.003591 0 0 1-182.003591-182.003591v-3.67684a182.003591 182.003591 0 0 1 182.003591-180.16517h126.850987a58.829443 58.829443 0 0 1 58.829444 58.829443zM552.445242 426.513465v-125.012567a182.003591 182.003591 0 0 1 182.003591-182.003591h3.67684a182.003591 182.003591 0 0 1 182.003591 182.003591v3.67684a182.003591 182.003591 0 0 1-182.003591 180.16517h-126.850987a58.829443 58.829443 0 0 1-58.829444-58.829443z" fill="#FFC000" opacity=".4" p-id="48499"></path>
            <path d="M256.459605 73.536804a143.396768 143.396768 0 0 1 143.396768 141.558349v196.710951h-176.48833a139.719928 139.719928 0 0 1-141.558348-141.558348v-55.152603A141.558348 141.558348 0 0 1 223.368043 73.536804h33.091562m0-73.536804h-33.091562A216.933573 216.933573 0 0 0 8.27289 215.095153v55.152603a215.095153 215.095153 0 0 0 215.095153 215.095152h213.256733a34.929982 34.929982 0 0 0 36.768402-34.929982V215.095153A216.933573 216.933573 0 0 0 256.459605 0zM800.631957 73.536804a143.396768 143.396768 0 0 1 143.396768 141.558349v55.152603a141.558348 141.558348 0 0 1-143.396768 141.558348h-174.64991V215.095153A143.396768 143.396768 0 0 1 767.540395 73.536804h33.091562m0-73.536804h-33.091562a216.933573 216.933573 0 0 0-215.095153 215.095153v235.317773a34.929982 34.929982 0 0 0 34.929982 34.929982h213.256733A215.095153 215.095153 0 0 0 1017.56553 270.247756v-55.152603A216.933573 216.933573 0 0 0 800.631957 0zM398.017953 610.355476v196.710951a143.396768 143.396768 0 0 1-143.396768 143.396769h-33.091562A143.396768 143.396768 0 0 1 79.971275 807.066427V753.752244a143.396768 143.396768 0 0 1 141.558348-143.396768h176.48833m36.768402-73.536805H221.529623A216.933573 216.933573 0 0 0 6.43447 753.752244v53.314183a216.933573 216.933573 0 0 0 215.095153 216.933573h33.091562a216.933573 216.933573 0 0 0 216.933573-216.933573V573.587074a36.768402 36.768402 0 0 0-36.768403-36.768403zM800.631957 610.355476A143.396768 143.396768 0 0 1 944.028725 753.752244v53.314183a143.396768 143.396768 0 0 1-143.396768 143.396769h-33.091562a143.396768 143.396768 0 0 1-141.558348-143.396769V610.355476h174.64991m0-73.536805H587.375224a36.768402 36.768402 0 0 0-34.929982 36.768403v233.479353a216.933573 216.933573 0 0 0 215.095153 216.933573h33.091562A216.933573 216.933573 0 0 0 1017.56553 807.066427V753.752244a216.933573 216.933573 0 0 0-216.933573-216.933573z" fill="#FFC000" p-id="48500"></path>
          </svg>
        </div>
        <div class="van-tabbar-item__text">
          分类
        </div>
      </div>
      <div class="van-tabbar-item search_item" @click="searchSHow = true" style="font-weight: 700;">
        <div class="van-badge__wrapper van-tabbar-item__icon">
          <svg t="1683969346141" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16190" width="0.5rem" height="0.5rem">
            <path d="M774.945 217.472c-153.447-153.445-403.141-152.253-556.19 3.247-150.405 152.812-150 399.937 0.85 551.242 123.333 123.707 309.099 147.262 456.799 70.878 16.091-8.323 35.662-5.401 48.43 7.368L799.2 924.57c17.485 17.487 45.888 17.438 63.434-0.113l64.383-64.378c17.544-17.551 17.596-45.951 0.111-63.44l-74.366-74.361c-12.764-12.768-15.693-32.335-7.372-48.423 76.305-147.535 52.893-333.047-70.445-456.383z" fill="#FFA820" p-id="16191"></path>
            <path d="M482.928 103.586c-96.091 3.89-191.137 42.927-264.173 117.133-45.116 45.838-76.644 100.166-94.631 157.844 58.277-148.084 194.892-256.753 358.804-274.977zM927.129 796.639l-24.463-24.462a440.376 440.376 0 0 1-125.91 129.949L799.2 924.57c17.485 17.487 45.888 17.438 63.434-0.113l64.383-64.378c17.545-17.552 17.597-45.951 0.112-63.44z" fill="#FEAC33" p-id="16192"></path>
            <path d="M135.219 518.308c0-208.765 169.237-378.002 378.002-378.002 193.947 0 353.777 146.067 375.489 334.194-4.521-93.557-42.429-185.692-113.766-257.028-80.221-80.22-186.746-118.147-292.017-113.886-163.911 18.224-300.526 126.893-358.803 274.976-41.977 134.607-10.12 287.479 95.481 393.399 35.209 35.316 75.512 62.455 118.559 81.451-120.628-63.145-202.945-189.51-202.945-335.104zM902.666 772.178l-49.903-49.899a41.079 41.079 0 0 1-10.474-17.838c-31.684 55.895-77.195 102.919-131.888 136.424a41.033 41.033 0 0 1 14.433 9.343l51.922 51.919a440.4 440.4 0 0 0 125.91-129.949z" fill="#FEB133" p-id="16193"></path>
            <path d="M842.289 704.44a41.699 41.699 0 0 1 3.102-30.585c32.171-62.203 46.615-131.157 43.32-199.356-21.712-188.127-181.541-334.194-375.489-334.194-208.765 0-378.002 169.237-378.002 378.002 0 145.595 82.317 271.959 202.946 335.105 107.742 47.545 232.705 44.004 338.24-10.574 10.802-5.587 23.169-6.099 33.997-1.974 54.691-33.505 100.202-80.529 131.886-136.424zM494.572 815.699c-175.617 0-317.982-142.365-317.982-317.982s142.365-317.982 317.982-317.982S812.554 322.1 812.554 497.717 670.189 815.699 494.572 815.699z" fill="#FEB633" p-id="16194"></path>
            <path d="M494.572 179.735c-175.617 0-317.982 142.365-317.982 317.982s142.365 317.982 317.982 317.982 317.982-142.365 317.982-317.982-142.365-317.982-317.982-317.982z m-18.65 555.353c-142.468 0-257.962-115.493-257.962-257.962s115.493-257.962 257.962-257.962 257.962 115.493 257.962 257.962S618.39 735.088 475.922 735.088z" fill="#FFBC34" p-id="16195"></path>
            <path d="M475.922 219.165c-142.468 0-257.962 115.493-257.962 257.962s115.493 257.962 257.962 257.962 257.962-115.493 257.962-257.962S618.39 219.165 475.922 219.165z m-18.65 435.313c-109.32 0-197.941-88.621-197.941-197.941s88.621-197.941 197.941-197.941 197.941 88.621 197.941 197.941-88.621 197.941-197.941 197.941z" fill="#FFC134" p-id="16196"></path>
            <path d="M457.272 258.595c-109.32 0-197.941 88.621-197.941 197.941s88.621 197.941 197.941 197.941 197.941-88.621 197.941-197.941-88.621-197.941-197.941-197.941z m-18.649 315.272c-76.172 0-137.921-61.749-137.921-137.921s61.749-137.921 137.921-137.921 137.921 61.749 137.921 137.921-61.75 137.921-137.921 137.921z" fill="#FFC634" p-id="16197"></path>
            <path d="M438.623 435.946m-137.921 0a137.921 137.921 0 1 0 275.842 0 137.921 137.921 0 1 0-275.842 0Z" fill="#FFCB34" p-id="16198"></path>
            <path d="M498.872 121.235c48.426 0 95.602 9.164 140.218 27.238 46.177 18.706 87.603 46.203 123.127 81.727 28.792 28.792 52.467 61.715 70.369 97.857 17.311 34.949 28.965 72.341 34.638 111.137a375.293 375.293 0 0 1-1.064 115.526c-6.395 38.773-18.762 76.075-36.756 110.867-11.986 23.172-7.714 51.07 10.633 69.421l74.364 74.359c10.439 10.441 10.388 27.482-0.109 37.984l-64.386 64.381c-5.107 5.108-11.886 7.922-19.09 7.922-7.143 0-13.85-2.774-18.887-7.811l-74.365-74.362c-11.177-11.178-26.066-17.335-41.923-17.335-9.512 0-19.023 2.319-27.504 6.705-52.829 27.321-112.325 41.762-172.057 41.762-48.516 0-95.771-9.197-140.454-27.336-46.254-18.776-87.729-46.373-123.272-82.024-143.84-144.274-144.185-380.196-0.768-525.907 35.953-36.529 77.982-64.818 124.92-84.082 45.311-18.599 93.211-28.029 142.366-28.029m0-18c-101.46 0-203.041 39.174-280.117 117.484-150.405 152.812-150 399.937 0.85 551.242 76.217 76.448 176.288 114.651 276.474 114.651 61.932 0 123.901-14.594 180.325-43.774a41.83 41.83 0 0 1 19.235-4.693c10.714 0 21.265 4.132 29.194 12.062L799.2 924.57c8.722 8.723 20.162 13.083 31.615 13.083 11.506 0 23.026-4.4 31.819-13.196l64.383-64.378c17.544-17.551 17.596-45.951 0.111-63.44l-74.366-74.361c-12.764-12.768-15.693-32.335-7.372-48.423 76.304-147.535 52.892-333.047-70.446-456.384-76.17-76.169-176.063-114.236-276.072-114.236z" fill="#FFA820" p-id="16199"></path>
            <path d="M500.179 288.647c110.402 0 199.9 89.498 199.9 199.898 0 110.402-89.498 199.9-199.9 199.9-110.4 0-199.898-89.498-199.898-199.9 0-110.4 89.497-199.898 199.898-199.898z" fill="#FFE3B4" p-id="16200"></path>
            <path d="M223.693 336.053a17.92 17.92 0 0 1-10.285-3.24c-8.152-5.688-10.15-16.909-4.461-25.062 42.858-61.422 90.059-96.521 92.047-97.984 8.007-5.895 19.273-4.183 25.167 3.822 5.892 8.002 4.185 19.264-3.813 25.161-0.769 0.571-44.743 33.514-83.878 89.602-3.499 5.015-9.093 7.701-14.777 7.701zM188.086 397.793c-2.758 0-5.555-0.636-8.179-1.977-8.852-4.525-12.358-15.37-7.833-24.221l5.121-10.016c4.525-8.851 15.37-12.357 24.221-7.833 8.852 4.525 12.358 15.37 7.833 24.221l-5.121 10.016c-3.184 6.227-9.497 9.81-16.042 9.81z" fill="#FFFFFF" p-id="16201"></path>
          </svg>
        </div>
        <div class="van-tabbar-item__text">

          <span style="color:orange">搜索</span>
        </div>
      </div>

      <div class="van-tabbar-item" @click="clickLook">
        <div class="van-badge__wrapper van-tabbar-item__icon">
          <svg t="1683944500286" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="29178" width="0.5rem" height="0.5rem">
            <path d="M757.9648 948.1216H271.6672c-107.264 0-194.2016-86.9376-194.2016-194.2016V267.6736c0-107.264 86.9376-194.2016 194.2016-194.2016h486.2464c107.264 0 194.2016 86.9376 194.2016 194.2016v486.2464c0.0512 107.264-86.8864 194.2016-194.1504 194.2016z" fill="#F6CC4F" p-id="29179"></path>
            <path d="M823.3472 441.6512c-38.9632-171.5712-210.2784-279.4496-381.8496-240.5376-47.7696 10.8544-91.4944 32.0512-128.9216 62.1568l0.2048-44.3904a25.61024 25.61024 0 0 0-25.4976-25.7024h-0.1024c-14.08 0-25.5488 11.3664-25.6 25.4976l-0.512 111.8208c-0.0512 6.8096 2.6624 13.312 7.424 18.1248 4.7616 4.8128 11.3152 7.5264 18.0736 7.5776l119.296 0.3584h0.1024c14.08 0 25.5488-11.4176 25.6-25.4976a25.61024 25.61024 0 0 0-25.4976-25.7024l-63.7952-0.2048c31.9488-26.2656 69.5296-44.7488 110.6432-54.0672 144.0256-32.7168 287.8976 57.856 320.6144 201.9328 32.7168 144.0768-57.9072 287.8976-201.9328 320.6144-144.128 32.7168-287.8976-57.9072-320.6144-201.9328-4.9152-21.6576-7.168-43.8272-6.656-65.8432a25.6512 25.6512 0 0 0-24.9856-26.2144 25.61536 25.61536 0 0 0-26.2144 24.9856c-0.6144 26.2144 2.048 52.5824 7.8848 78.3872 33.5872 147.9168 165.4784 248.5248 311.1424 248.5248 23.3472 0 47.0016-2.56 70.7072-7.936 171.52-39.0656 279.4496-210.3296 240.4864-381.952z" fill="#F7F8F8" p-id="29180"></path>
            <path d="M512.1536 382.3104c-14.1312 0-25.6 11.4688-25.6 25.6v106.7008c0 6.3488 2.3552 12.4416 6.6048 17.152l91.5968 101.6832c5.0688 5.632 12.032 8.448 19.0464 8.448 6.0928 0 12.2368-2.1504 17.1008-6.6048a25.58976 25.58976 0 0 0 1.8944-36.1472l-85.0432-94.3616V407.9104c0-14.1824-11.4688-25.6-25.6-25.6z" fill="#F7F8F8" p-id="29181"></path>
          </svg>
        </div>
        <div class="van-tabbar-item__text">

          看过
        </div>
      </div>
      <div class="van-tabbar-item" @click="clickMe">
        <div class="van-badge__wrapper van-tabbar-item__icon">
          <svg t="1683944753328" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="33824" width="0.5rem" height="0.5rem">
            <path d="M512 558.933333c-128 0-234.666667-106.666667-234.666667-234.666666S384 89.6 512 89.6s234.666667 106.666667 234.666667 234.666667c0 132.266667-106.666667 234.666667-234.666667 234.666666z m0-409.6c-98.133333 0-174.933333 81.066667-174.933333 174.933334s81.066667 174.933333 174.933333 174.933333 174.933333-81.066667 174.933333-174.933333-76.8-174.933333-174.933333-174.933334z" fill="#6A3906" p-id="33825"></path>
            <path d="M512 516.266667c-89.6 0-166.4-72.533333-166.4-166.4S418.133333 183.466667 512 183.466667s166.4 72.533333 166.4 166.4-76.8 166.4-166.4 166.4" fill="#F5CB2B" p-id="33826"></path>
            <path d="M469.333333 366.933333c-17.066667 0-25.6-8.533333-25.6-21.333333v-29.866667c0-12.8 8.533333-21.333333 21.333334-21.333333h4.266666c12.8 0 21.333333 8.533333 21.333334 21.333333V341.333333c4.266667 17.066667-8.533333 25.6-21.333334 25.6zM563.2 366.933333c-17.066667 0-25.6-8.533333-25.6-21.333333v-29.866667c0-12.8 8.533333-21.333333 21.333333-21.333333h4.266667c12.8 0 21.333333 8.533333 21.333333 21.333333V341.333333c0 17.066667-8.533333 25.6-21.333333 25.6zM780.8 930.133333H243.2c-85.333333 0-157.866667-72.533333-157.866667-157.866666s72.533333-157.866667 157.866667-157.866667h537.6c85.333333 0 157.866667 72.533333 157.866667 157.866667 0 89.6-72.533333 157.866667-157.866667 157.866666z m-537.6-256c-55.466667 0-98.133333 42.666667-98.133333 98.133334 0 55.466667 42.666667 98.133333 98.133333 98.133333h537.6c55.466667 0 98.133333-42.666667 98.133333-98.133333 0-55.466667-42.666667-98.133333-98.133333-98.133334H243.2z" fill="#6A3906" p-id="33827"></path>
          </svg>
        </div>
        <div class="van-tabbar-item__text">

          我的
        </div>
      </div>
    </van-tabbar>

  </div>
  <script>


  </script>

  <script type="module">
    import MyComponent from '/waphome/components/test.js'
    import Header from '/waphome/components/header.js'
    import Login from '/waphome/components/login.js'
    import searchPopup from '/waphome/components/searchPopup.js?v=2023'
    import payCofirm from '/waphome/components/payCofirm.js'
    import CouponDialog from '/waphome/components/CouponDialog.js'

    // 生成时间戳
    let timestamp = Math.floor(Date.now() / 1000)
    const token = '98uu8ru8w0d9kc82ijr8uu8djek9id92'
    let stringToSign = timestamp + '' + timestamp

    // 使用密钥或令牌对请求参数和时间戳进行签名
    let signature = CryptoJS.HmacSHA512(stringToSign, token).toString()

    const render = () => {
      const timer = setTimeout(() => {
        timestamp = Math.floor(Date.now() / 1000)
        stringToSign = timestamp + '' + timestamp
        signature = CryptoJS.HmacSHA512(stringToSign, token).toString()
        // console.log('reder')
        render()
        clearTimeout(timer)
      }, 14000)
    }
    render()

    // service({
    //   method: 'GET',
    //   url: '/test_message',
    //   headers: {
    //     signature,
    //     timestamp
    //   }
    // })


    // import Home from '/waphome/components/home.js'
    // import WordItem from '/waphome/components/worditem.js'
    import {
      getItem,
      setItem,
      removeItem
    } from '/waphome/utils/local.js'
    const {
      ref,
      toRefs,
      reactive,
      computed,
      watch,
      onMounted
    } = Vue


    // 路由

    const {
      createRouter,
      createWebHistory
    } = VueRouter;
    var router = createRouter({
      history: createWebHistory(),
      routes: [],
    });
    console.log(router);

    router.beforeEach((to, from, next) => {
      console.log(to)
      // 有token请求用户信息和下载次数
      if (getItem('TOKEN')) {
        service({
          method: 'GET',
          url: '/member/me'
        }).then(res => {
          if (res.code === 200) {
            setItem('userInfo', JSON.stringify(res.data))
          } else {
            return false
          }
        }).catch(() => {
          return false
        })
        // 下载次数
        service({
          method: 'GET',
          url: '/member/get_day_num'
        }).then(obj => {
          obj.code === 200 ? setItem('downloadNum', obj.count) : false
        })

      }
      // 获取nomal信息
      service({
        method: 'GET',
        url: '/intro/get_normal',
        headers: {
          signature,
          timestamp
        }
      }).then(res => {
        res.code === 200 ? setItem('nomal', JSON.stringify(res.data)) : false
      })
      next()
    });


    /**
     * word组件
     */
    const WordItem = {
      props: {
        item: {
          type: Object
        }
      },
      setup(props, context) {
        // const store = useStore()
        // console.log(props.item)
        const clickWordItem = (id) => {
          // 存取历史
          // store.commit('user/setLookHistory', item)

          window.location.href = `/contractdetail/${id}.html`
          // router.push({
          //   name: 'contractdetail',
          //   params: {
          //     id: item.id + '.html'
          //   }
          // })
        }
        return {
          props,
          clickWordItem
        }
      },
      template: `
      <li class="worditem_li" @click="clickWordItem(item)">
      <div class="pic">
        <img :src="item?.title_pic" alt="">
      </div>
      <div class="text">@{{ item?.title }}</div>
    </li>
      `
    }


    /**
     * 根组件
     */

    Vue.createApp({
        setup() {
          const active = ref(0)
          // const route = useRoute()
          // const store = useStore()
          const classIfyList = reactive([]) // 全部分类
          const isRouterAlive = ref(true)
          const diaLogShow = ref(false)
          const showLogin = ref(false)
          // const time = ref(3600)
          // let timer = null
          // const router = useRouter()
          const data = reactive({
            orderNo: getItem('orderNo') || '',
            swiperList: [{}]
          })
          const copponShow = ref(false)
          const payCofirmShow = ref(false)
          const searchSHow = ref(false)

          // let userInfo = null
          // setTimeout(() => {
          //   userInfo = computed(() => getItem('userInfo'))
          // }, 1000)

          const userInfo = computed(() => getItem('userInfo'))
          console.log(userInfo)
          const orderNo = computed(() => getItem('orderNo'))
          const href = computed(() => location.href)


          // const store = useStore()
          const openvipSHow = ref(false)
          const show = ref(false)
          const classActive = ref(0)
          const avtiveTab = ref(-1)
          // const swiperList = reactive([])
          onMounted(() => {
            // eslint-disable-next-line no-new
            new Swiper('.swiper-container', {
              pagination: {
                el: '.swiper-pagination'
              },
              slidesPerView: 2,
              // centeredSlides: true,
              freeMode: true,
              // slidesPerGroup: 3,
              loop: false, // 循环模式选项
              direction: 'horizontal', // Swiper的滑动方向，可设置为水平方向切换 horizontal 或垂直方向切换 vertical 。可使用断点（breakpoints,4.5.0后）设置不同分辨率下的切换方向。可使用 swiper.changeDirection() 方法动态更改切换方向。
              speed: 300, // 切换速度，即slider自动滑动开始到结束的时间（单位ms），也是触摸滑动时释放至贴合的时间。
              // slidesPerView: 'auto',
              // centeredSlides: true,
              spaceBetween: 20,
              autoplay: false,
              // pagination: false,
              effect: 'slide', // 设置Slide的切换效果，默认为"slide"（普通位移切换），还可设置为"fade"（淡入）、"cube"（方块）、"coverflow"（3d流）、"flip"（3d翻转）、"cards"(卡片式)、"creative"（创意性）。
              observer: true,
              observeParents: true,
              observeSlideChildren: true,
              slideToClickedSlide: true // 点击的slide会居中
            })
            // mySwiper()
          })

          // const classIfyList = reactive([
          // ])
          const data2 = reactive({
            hotClassifyList: [{}, {}, {}]
          })
          const classIfyListArr = reactive([])

          // 获取轮播图
          const getSwiper = () => {
            service({
              method: 'GET',
              url: '/banner/get_list',
              params: {
                type: 2
              }
            }).then(res => {
              document.querySelector('#emty').style.display = 'none'
              // res.code === 200 ? swiperList.push(...res.data) : console.log('获取轮播图失败')
              res.code === 200 ? data.swiperList = res.data : console.log('获取轮播图失败')

              // console.log(swiperList)
            })
          }
          getSwiper()


          // 点击tab项目
          const clickItem = () => {
            console.log('ok')
            window.location.href = `/classify/f/${classActive.value}?id=${classIfyListArr[classActive.value]?.id}`
            // router.push({
            //   params: {
            //     type: 'f',
            //     pidx: classActive.value
            //   },
            //   query: {
            //     id: classIfyList[classActive.value]?.id
            //   }
            // })
          }

          // 获取全部分类
          const getClassifyAll = async () => {
            try {
              const res = await contract()
              // console.log(res)
              classIfyListArr.push(...res.data)
            } catch (err) {
              // return Toast.fail('加载分类数据失败')
              console.log(err)
            }
          }
          // getClassifyAll()

          // 获取首页热门分类
          const getHotClassifyList = async () => {
            // Toast.loading('加载中')
            const res = await service({
              method: 'GET',
              url: '/wap_main/get_wap_banner'
            })
            data2.hotClassifyList = res.data
            document.querySelectorAll('#side_item_emty').forEach(el => {
              el.style.display = 'none'
            })
            //   console.log(data.hotClassifyList)
            // Toast.clear()
          }
          getHotClassifyList()

          // 点击热门分类
          const hotClassClick = (url) => {
            window.location.href = url
          }

          // 获取手机端首页列表
          const getHomeLists = async () => {
            const res = await service({
              method: 'GET',
              url: '/wap_main/get_main_list',
              params: {
                limit: 4
              }
            })
            // console.log(res)
            data.homeList = res.data
          }
          getHomeLists()

          // 点击联系客服
          const clickServe = () => {
            window.location.href = store.getters.nomal.wap_url
          }
          // 点击关于我们
          const clickMy = () => {
            window.location.href = 'https://www.wenhetong.com/helpCenter?type=5'
          }
          // 点击banner图片
          const picClick = () => {
            if (!store.state.user.userInfo) {
              // 请登录
              show.value = true
            } else {
              if (store.state.user.userInfo.final === 1) {
                // 终身会员不需要打开vip弹框
                return vant.Toast.fail('您已经是终身vip了')
              }
              checkOrder()
                .then((res) => {
                  // console.log(res)
                  if (res.count >= 1) {
                    Dialog.confirm({
                        title: '提示',
                        message: '您当前有未支付的订单，是否前往订单页'
                      })
                      .then(() => {
                        // on confirm
                        router.push({
                          name: 'order'
                        })
                      })
                      .catch(() => {
                        // on cancel
                      })
                  } else {
                    // 打开vip弹窗
                    openvipSHow.value = true
                  }
                })
              // .catch(() => {
              //   this.$message.error('接口出错')
              // })
            }
          }

          // 查看更多
          const clickMore = (title) => {

            window.location.href = `/wap/search?keyword=${title}`
          }
          // 点击轮播图
          const clickToSwiperUrl = (addr) => {
            window.location.href = addr
          }

          // console.log(userInfo.value);
          // 点击我的
          const clickMe = () => {
            window.location.href = '/wap/my'
            //   if (userInfo.value) {
            //     window.location.href = '/wap/my'
            //     // router.push({
            //     //   name: 'my'
            //     // })
            //   } else {
            //     // 打开登录框
            //     showLogin.value = true
            //   }
          }

          const clickWordItem = (id, title, title_pic) => {
            // 存取历史
            //   store.commit('user/setLookHistory', item)
            let lookHistoryList = getItem('lookHistoryList') ? getItem('lookHistoryList') : []
            const index = lookHistoryList.findIndex(item => item.id === id)
            if (index !== -1) {
              lookHistoryList.splice(index, 1)
            }
            lookHistoryList.unshift({
              id: id,
              title: title,
              title_pic: title_pic
            })
            setItem('lookHistoryList', lookHistoryList)

            window.location.href = `/contractdetail/${id}.html`
            // router.push({
            //   name: 'contractdetail',
            //   params: {
            //     id: item.id + '.html'
            //   }
            // })
          }

          const clickToClass = () => {
            window.location.href = '/wap/classify/f/0?id=1'

          }

          const clickToHome = () => {
            window.location.href = '/'
          }
          const clickLook = () => {
            window.location.href = '/wap/hisrtoy'
          }
          // 未支付 点击跳转订单页去支付
          const goonPay = async () => {
            // clearInterval(timer)
            const result = await service({
              method: 'GET',
              url: '/wxpay/check_status',
              params: {
                order_no: orderNo
              }
            })
            //   store.commit('user/removeOrderNo')
            removeItem('orderNo')
            if (result.status === 1) {
              // 已支付
              vant.Toast.success('支付成功')
              // store.commit('user/removeOrderNo')
              removeItem('orderNo')
              setTimeout(() => {
                location.reload()
              }, 1000)
            } else if (result.status === 0) {
              // store.commit('user/removeOrderNo')
              removeItem('orderNo')
              // 未支付
              const res = await service({
                method: 'GET',
                url: '/order/send_coupon'
              })
              if (res.code === 200) {
                // 弹出优惠券弹框
                copponShow.value = true
              } else {
                vant.Toast('稍后进入订单页核实订单状态,请不要发起重复支付')
              }
            } else if (result.status === 2) {
              vant.Toast.fail('支付取消')
            } else {
              vant.Toast('稍后进入订单页核实订单状态,请不要发起重复支付')
              setTimeout(() => {
                location.reload()
              }, 800)
            }
          }
          // 点击已完成
          const finish = async () => {
            // clearInterval(timer)
            const result = await service({
              method: 'GET',
              url: '/wxpay/check_status',
              params: {
                order_no: orderNo
              }
            })
            //   store.commit('user/removeOrderNo')
            removeItem('orderNo')
            if (result.status === 1) {
              // 已支付
              vant.Toast.success('支付成功')
              // store.commit('user/removeOrderNo')
              removeItem('orderNo')
              setTimeout(() => {
                location.reload()
              }, 1000)
            } else if (result.status === 0) {
              // store.commit('user/removeOrderNo')
              removeItem('orderNo')
              // 未支付
              const res = await service({
                method: 'GET',
                url: '/order/send_coupon'
              })
              if (res.code === 200) {
                // 弹出优惠券弹框
                copponShow.value = true
              } else {
                vant.Toast('稍后进入订单页核实订单状态,请不要发起重复支付')
              }
            } else if (result.status === 2) {
              vant.Toast.fail('支付取消')
            } else {
              vant.Toast('稍后进入订单页核实订单状态,请不要发起重复支付')
              setTimeout(() => {
                location.reload()
              }, 800)
            }
          }
          watch(() => orderNo.value, (val) => {
            console.log(val)
            if (location.href.includes('pay')) {
              return false
            } else {
              if (val && val.length) {
                // timer = setInterval(() => {
                //   time.value--
                //   chexkStatuss(data.orderNo)
                // }, 1200)
                setTimeout(() => {
                  payCofirmShow.value = true
                }, 2200)
                // checkOrders()
              } else {
                // clearInterval(timer)
              }
            }
          }, {
            immediate: true
          })

          watch(href, (val) => {
            console.log(val);
            if (val.includes('/')) {
              active.value = 0
            } else if (val.includes('classify')) {
              active.value = 1
              // getClassifyAll()
            } else if (val.includes('my')) {
              active.value = 2
            }
          }, {
            immediate: true
          })



          onMounted(() => {
              const url = window.location.href;
                console.dir(url);
// 获取查询字符串部分
//               const queryString = window.location.search;
//
// // 解析查询字符串为对象
//               const params = new URLSearchParams(queryString);
//
// // 获取特定参数的值
//               const a_user = params.get('a_user');
//               const a_plainid =  params.get('a_planid');
//               const a_unitid =  params.get('a_unitid');
//               const bd_vid =params.get('bd_vid');
//               const a_keywordid = params.get('a_keywordid');
            //               const login = document.querySelector('#islogin')
            //   if (userInfo.value) {
            //     login.innerHTML = '我的'
            //   } else {
            //     login.innerHTML = '登录'
            //   }

            window.onload = function() {
              document.addEventListener('touchstart', function(event) {
                if (event.touches.length > 1) {
                  event.preventDefault()
                }
              })
              let lastTouchEnd = 0
              document.addEventListener('touchend', function(event) {
                const now = (new Date()).getTime()
                if (now - lastTouchEnd <= 300) {
                  event.preventDefault()
                }
                lastTouchEnd = now
              }, false)

              // 阻止双指放大
              document.addEventListener('gesturestart', function(event) {
                event.preventDefault()
              })
            }
          })


          return {
            active,
            avtiveTab,
            classIfyList,
            searchSHow,
            isRouterAlive,
            showLogin,
            goonPay,
            finish,
            diaLogShow,
            copponShow,
            ...toRefs(data),
            payCofirmShow,
            userInfo,
            clickMe,
            clickToHome,
            clickToClass,
            clickLook,
            // classIfyList,
            openvipSHow,
            show,
            ...toRefs(data2),
            hotClassClick,
            clickMy,
            clickServe,
            picClick,
            classActive,
            clickItem,
            classIfyListArr,
            clickMore,
            //   swiperList,
            clickToSwiperUrl,
            clickWordItem
          }
        },
        mounted() {
          console.log(this.count) // 0
        }
      })
      .use(vant)
      .use(router)
      .component('my-component', MyComponent)
      .component('header-index', Header)
      .component('search-popup', searchPopup)
      .component('pay-cofirm', payCofirm)
      .component('coupon-dialog', CouponDialog)

      // .component('home-index', Home)
      .component('login-index', Login)
      .component('word-item', WordItem)
      .mount('#app')
  </script>
</body>

</html>
